how to wait for async operation in javascript

visit shbcf.ru